<script setup lang="ts">
import { ProcessDefineVO, processDefineComplexInfo } from "@/api/flowable";
import { onMounted } from "vue";
import { ref } from "vue";
import { useRouter } from "vue-router";
const router = useRouter();

const id: string = router.currentRoute.value.query.id as string;

const processDesignRef = ref();

const info = ref<ProcessDefineVO>();

onMounted(async () => {
  const res = await processDefineComplexInfo({ id });
  if (res.success) {
    info.value = res.data;
    processDesignRef?.value?.initBpmn(info.value);
  }
});
</script>

<template>
  <ProcessDesign ref="processDesignRef" />
</template>

<style></style>
